/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
jQuery.noConflict();
jQuery(function($){
	$.datepicker.regional['pt-BR'] = {
		closeText: 'Fechar',
		prevText: '&#x3c;Anterior',
		nextText: 'Pr&oacute;ximo&#x3e;',
		currentText: 'Hoje',
		monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
		'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
		monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
		'Jul','Ago','Set','Out','Nov','Dez'],
		dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','S&aacute;bado'],
		dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
		dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
		weekHeader: 'Sm',
		dateFormat: 'dd/mm/yy',
		firstDay: 0,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
});

$(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	$("a").click(function(){
		$(this).blur();
	});
	
	//When mouse rolls over
	$("#menu li").mouseover(function(){
		$(this).stop().animate({height:$(this).attr('height')+'px'},{queue:true, duration:600, easing: 'easeOutBounce'});
		
	});
	
	//When mouse is removed
	$("#menu li").mouseout(function(){
		$(this).stop().animate({height:'66px'},{queue:false, duration:600, easing: 'easeOutBounce'})
	});
	
    $('#menu li').hover(function() {
        var currentImg = $('img:first',this).attr('src');
        $('img:first',this).attr('src', $('img:first',this).attr('hover'));
        $('img:first',this).attr('hover', currentImg);
		$('img:first',this).css("background-color","#CD3B3B");
    }, function() {
        var currentImg = $('img:first',this).attr('src');
        $('img:first',this).attr('src', $('img:first',this).attr('hover'));
        $('img:first',this).attr('hover', currentImg);
		$('img:first',this).css("background-color","");
    });	
	
    $('.rollover').hover(function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    }, function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    });	
	
	$(".date").datepicker({
						  showOn: 'button',
						  buttonImage: 'media/img/smoothness/calendar.png',
						  buttonImageOnly: true
						  });
	
	
});